<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
    <p>ok</p>
    <script>
        {#不进行转义的进行发送#}
        opener.foo('{{ ret|safe }}');
        window.close()
    </script>
</body>
</html>